namespace ShareMarking.Entity {
    	using System;


    /// <summary>
    /// 表名：qr_Log 主键列：id
    /// </summary>
    [SerializableAttribute()]
    public partial class qr_Log : MySoft.Data.Entity
    {

        protected Int32 _id;

        protected Int32? _codeid;

        protected String _openid;

        protected String _codename;

        protected String _addtime;

        public Int32 id
        {
            get
            {
                return this._id;
            }
            set
            {
                this.OnPropertyValueChange(_.id, _id, value);
                this._id = value;
            }
        }

        public Int32? codeid
        {
            get
            {
                return this._codeid;
            }
            set
            {
                this.OnPropertyValueChange(_.codeid, _codeid, value);
                this._codeid = value;
            }
        }

        public String openid
        {
            get
            {
                return this._openid;
            }
            set
            {
                this.OnPropertyValueChange(_.openid, _openid, value);
                this._openid = value;
            }
        }

        public String codename
        {
            get
            {
                return this._codename;
            }
            set
            {
                this.OnPropertyValueChange(_.codename, _codename, value);
                this._codename = value;
            }
        }

        public String addtime
        {
            get
            {
                return this._addtime;
            }
            set
            {
                this.OnPropertyValueChange(_.addtime, _addtime, value);
                this._addtime = value;
            }
        }

        /// <summary>
        /// 获取实体对应的表名
        /// </summary>
        protected override MySoft.Data.Table GetTable()
        {
            return new MySoft.Data.Table<qr_Log>("qr_Log");
        }

        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        protected override MySoft.Data.Field[] GetPrimaryKeyFields()
        {
            return new MySoft.Data.Field[] {
    					_.id};
        }

        /// <summary>
        /// 获取列信息
        /// </summary>
        protected override MySoft.Data.Field[] GetFields()
        {
            return new MySoft.Data.Field[] {
    					_.id,
    					_.codeid,
    					_.openid,
    					_.codename,
    					_.addtime};
        }

        /// <summary>
        /// 获取列数据
        /// </summary>
        protected override object[] GetValues()
        {
            return new object[] {
    					this._id,
    					this._codeid,
    					this._openid,
    					this._codename,
    					this._addtime};
        }

        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        protected override void SetValues(MySoft.Data.IRowReader reader)
        {
            if ((false == reader.IsDBNull(_.id)))
            {
                this._id = reader.GetInt32(_.id);
            }
            if ((false == reader.IsDBNull(_.codeid)))
            {
                this._codeid = reader.GetInt32(_.codeid);
            }
            if ((false == reader.IsDBNull(_.openid)))
            {
                this._openid = reader.GetString(_.openid);
            }
            if ((false == reader.IsDBNull(_.codename)))
            {
                this._codename = reader.GetString(_.codename);
            }
            if ((false == reader.IsDBNull(_.addtime)))
            {
                this._addtime = reader.GetString(_.addtime);
            }
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public override bool Equals(object obj)
        {
            if ((obj == null))
            {
                return false;
            }
            if ((false == typeof(qr_Log).IsAssignableFrom(obj.GetType())))
            {
                return false;
            }
            if ((((object)(this)) == ((object)(obj))))
            {
                return true;
            }
            return false;
        }

        public class _
        {

            /// <summary>
            /// 表示选择所有列，与*等同
            /// </summary>
            public static MySoft.Data.AllField All = new MySoft.Data.AllField<qr_Log>();

            /// <summary>
            /// 字段名：id - 数据类型：Int32
            /// </summary>
            public static MySoft.Data.Field id = new MySoft.Data.Field<qr_Log>("id");

            /// <summary>
            /// 字段名：codeid - 数据类型：Int32(可空)
            /// </summary>
            public static MySoft.Data.Field codeid = new MySoft.Data.Field<qr_Log>("codeid");

            /// <summary>
            /// 字段名：openid - 数据类型：String
            /// </summary>
            public static MySoft.Data.Field openid = new MySoft.Data.Field<qr_Log>("openid");

            /// <summary>
            /// 字段名：codename - 数据类型：String
            /// </summary>
            public static MySoft.Data.Field codename = new MySoft.Data.Field<qr_Log>("codename");

            /// <summary>
            /// 字段名：addtime - 数据类型：String
            /// </summary>
            public static MySoft.Data.Field addtime = new MySoft.Data.Field<qr_Log>("addtime");
        }
    }
}
